import request from '@/utils/request'

/**
 *
 * @param {Obj} data 登录需要的参数对象, 需要 mobile 和 password
 * @returns 返回一个possmib对象
 */
export function getDepartments() {
  return request({
    method: 'get',
    url: '/company/department'
  })
}

export function addDepartments(data) {
  return request({
    method: 'post',
    url: '/company/department',
    data
  })
}
export function addDepartmentsEdit(id) {
  return request({
    method: 'get',
    url: '/company/department/' + id
  })
}

export function updataDepartmentsEdit(data) {
  return request({
    method: 'put',
    url: '/company/department/' + data.id,
    data
  })
}

export function delDepartmentsEdit(id) {
  return request({
    method: 'delete',
    url: '/company/department/' + id
  })
}
